<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>petBoxy后台管理</title>
<link rel="stylesheet" href="http://cdn.amazeui.org/amazeui/2.4.1/css/amazeui.min.css" />
<link rel="stylesheet" href="/resources/css/amazeui.min.css" />
<link href="/resources/css/main1.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.goodsadd{margin-left: 120px;margin-top: 0px;width: 800px;}
.goodsadd ul li{margin-bottom:20px}
.submit{
	margin-left: 200px;
	width: 120px;
	height: 36px;
	display: block;
	background: #00c901;
	text-align: center;
	line-height: 36px;
	text-decoration: none;
	font-size: 14px;
	color: #fff;
	border-radius: 3px;
}
.submit:hover{background: #0a0;}
.file {
    position: relative;
    display: inline-block;
    background: #D0EEFF;
    border: 1px solid #99D3F5;
    border-radius: 4px;
    top: 10px;
    padding: 4px 12px;
    overflow: hidden;
    color: #1E88C7;
    text-decoration: none;
    text-indent: 0;
    line-height: 20px;
}
.file input {
    position: absolute;
    font-size: 100px;
    right: 0;
    top: 0;
    opacity: 0;
}
.file:hover {
    background: #AADFFD;
    border-color: #78C3F3;
    color: #004974;
    text-decoration: none;
}
.image_container {
        width: 48px;
        height: 48px;
        float: right;
        margin-right: 340px;
}
 #wrongimg{
	color: red;
	margin-bottom: 10px;
}
</style>
</head>
<body>
<div class="main">
	<div class="top">
	<img src="/resources/images/logo1.png"width="180px" height="50px" >
	</div>
	<div class="menu">
			<ul class="am-list admin-sidebar-list" id="collapase-nav-1">
		  <li class="am-panel">
		    <a data-am-collapse="{parent: '#collapase-nav-1', target: '#company-nav'}">
		        <i class="am-icon-table am-margin-left-sm"></i> 商品管理 <i class="am-icon-angle-right am-fr am-margin-right"></i>
		    </a>
		    <ul class="am-list am-collapse admin-sidebar-sub" id="company-nav">
		        <li><a href="/admin/addpets"><span class="am-icon-table am-margin-left-sm"></span> 添加狗狗 </a></li>
		        <li><a href="/admin/petDetails"><span class="am-icon-table am-margin-left-sm"></span> 狗狗列表 </a></li>
		        <li><a href="/admin/addpetGoods"><span class="am-icon-table am-margin-left-sm"></span> 添加商品 </a></li>
		        <li><a href="/admin/petGoodDetails"><span class="am-icon-table am-margin-left-sm"></span> 商品列表 </a></li>
		    </ul>
		  </li>
		</ul>
</div>

	<div class="content">
		<div class="content1">
		当前位置：修改狗狗
			
		</div>
		<div class="goodsadd">
			<ul><div id="wrongimg">${petMsg}</div>
			<form action="" method="post" enctype="multipart/form-data" onsubmit="return checkfile(this)" >
				<li>狗狗名称：
				<input type="text" style="width: 246px;" name="name" value="${pet.goodName}"></input> 
				</li>
				<li>狗狗性别：
				<label><input name="sex" type="radio" value="公" <c:if test="${pet.sex=='公'}">checked </c:if>/>公 </label>
				<label><input name="sex" type="radio" value="母" <c:if test="${pet.sex=='母'}">checked </c:if>/>母 </label>	
				</li>
				<li>狗狗年龄：
				<input type="text" style="width: 246px;" name="age" value="${pet.age}"></input> 
				</li>
				<li>狗狗毛色：
				<input type="text" style="width: 246px;" name="color" value="${pet.color}"></input> 
				</li>

				<div class="image_container">
          		<img id="preview" width="180" height="180" src="/resources/images/${pet.goodImg}">
        		</div>

				<li>狗狗库存：
				<input type="text" style="width: 246px;" name="stock" value="${pet.stock}"></input> 
				</li>

				<li>狗狗图片：
				<a href="javascript:;" class="file">选择图片
    			<input type="file" name="img" id="img" onchange="previewImage(this);">
				</a>
				<!-- <input class="serverImg" id="imgName" name="imgName" /> -->
	
				</li>
				
				<li>狗狗价格：
				<input type="text" style="width: 246px;" name="price" value="${pet.price}"></input> 
				</li>
			
				<li>狗狗种类：
				<select onchange="topen(this.value, true)" class="cont" id="mark-pro" name="kinds">
				<option value="0" style="background: none repeat scroll 0 0 #EDF2FE;color: #0055AA;font-style: normal;" >选择狗狗种类</option>
				<option value="1"  <c:if test="${pet.kindsId==1}">selected = "selected"</c:if> > 泰迪</option>
				<option value="2" <c:if test="${pet.kindsId==2}">selected = "selected"</c:if>> 哈士奇</option>
				<option value="3" <c:if test="${pet.kindsId==3}">selected = "selected"</c:if>> 边牧</option>
				<option value="4" <c:if test="${pet.kindsId==4}">selected = "selected"</c:if>> 拉布拉多</option>
				<option value="5" <c:if test="${pet.kindsId==5}">selected = "selected"</c:if>> 萨摩耶</option>
				<option value="6" <c:if test="${pet.kindsId==6}">selected = "selected"</c:if>> 柯基犬</option>
				<option value="7" <c:if test="${pet.kindsId==7}">selected = "selected"</c:if>> 比熊</option>
				<option value="8" <c:if test="${pet.kindsId==8}">selected = "selected"</c:if>> 金毛</option>
				<option value="9" <c:if test="${pet.kindsId==9}">selected = "selected"</c:if>> 藏獒</option>
				</select>
				</li>
				<li>狗狗血统：
				<input type="text" style="width: 246px;" name="blood" value="${pet.blood}"></input> 
				</li>
				<li>
					<input type="submit" value="提交" class="submit"></input> 
				
				</li></form>
			</ul>			
		</div>
	</div>
</div>

<script src="/resources/js/jquery-3.1.1.min.js"></script>
<script src="/resources/js/amazeui.min.js"></script>
<script src="/resources/js/preview.js"></script>
<script src="/resources/js/modify.js"></script>
</body>
</html>